package DataLayer;


import org.jfree.data.jdbc.JDBCCategoryDataset;

public class DaoTransactionLineChart extends DaoConnection {
		private static DaoTransactionLineChart single;
		
		public JDBCCategoryDataset getLineSet(){
			JDBCCategoryDataset dataset = null;
			try {
				openConn();
				dataset = new JDBCCategoryDataset(getConn());
				String sql = ("SELECT name, type, accountNumber, balance from Account");
				
				dataset.executeQuery(sql);
				closeconn();
			} catch (Exception e) {
				e.printStackTrace();
			}
			return dataset;
		}
		
		public static DaoTransactionLineChart getInstance(){
			if(single == null){
				single = new DaoTransactionLineChart();
			}
			return single;
		}
		
		public static void selfDestroy(){
			single = null;
		}
}
